// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 分页 记录  */
export async function pageRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<PressconferenceData.RecordPage[]>>(
    '/pressconference/record/page',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/**
 * 获取树形 联络人列表
 * @returns
 */
export async function saveRecordInitAssignContact(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<any>>(
    '/pressconference/record/save/init/assign/contact',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 保存记录  */
export async function saveRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/pressconference/record/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 选择 记录  */
export async function selectRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.RecordSelect>>(
    '/pressconference/record/select',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 保存回执  */
export async function saveReceipt(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/pressconference/receipt/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 列表 回执 */
export async function listReceipt(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.ReceiptPage[]>>(
    '/pressconference/receipt/list',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 获取 配置 联络人 树形结构  */
export async function treeAddress(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<UserData.Organization[]>>(
    '/pressconference/address/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 初始化选题配置 */
export async function initAddressEdit(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.AddressVo>>(
    '/pressconference/address/edit/init',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 初始化配置 */
export async function saveAddressEdit(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.AddressVo>>(
    '/pressconference/address/edit/save',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 初始化配置 */
export async function editInitList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.AddressVo>>(
    '/pressconference/address/edit/list',
    {
      method: 'POST',
      data: options || {},
    },
  );
}


/** 回执 树 */
export async function treeReceipt(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<PressconferenceData.AddressVo>>(
    '/pressconference/receipt/address/contact/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}
